﻿using System;
using System.Diagnostics.CodeAnalysis;
using System.Management.Automation.Host;

namespace BGShell.PowerShell.Host
{
    interface IRunspaceHostRawUI
    {
        ConsoleColor BackgroundColor
        {
            get;
            set;
        }

        Size BufferSize
        {
            get;
            set;
        }

        Coordinates CursorPosition
        {
            get;
            set;
        }

        int CursorSize
        {
            get;
            set;
        }

        void FlushInputBuffer();

        ConsoleColor ForegroundColor
        {
            get;
            set;
        }

        [SuppressMessage("Microsoft.Performance", "CA1814:PreferJaggedArraysOverMultidimensional", MessageId = "Return")]
        BufferCell[,] GetBufferContents(Rectangle rectangle);

        bool KeyAvailable
        {
            get;
        }

        Size MaxPhysicalWindowSize
        {
            get;
        }

        Size MaxWindowSize
        {
            get;
        }

        KeyInfo ReadKey(ReadKeyOptions options);

        void ScrollBufferContents(Rectangle source, Coordinates destination, Rectangle clip, BufferCell fill);

        void SetBufferContents(Rectangle rectangle, BufferCell fill);

        [SuppressMessage("Microsoft.Performance", "CA1814:PreferJaggedArraysOverMultidimensional", MessageId = "1#")]
        void SetBufferContents(Coordinates origin, BufferCell[,] contents);

        Coordinates WindowPosition
        {
            get;
            set;
        }

        Size WindowSize
        {
            get;
            set;
        }

        String WindowTitle
        {
            get;
            set;
        }
    }
}
